<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- Cmm representations using Hoopl's Graph CmmNode e x.</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE GADTs #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE KindSignatures #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE DataKinds #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE ExplicitNamespaces #-}</span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Cmm</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-8"></span><span>     </span><span class="annot"><span class="hs-comment">-- * Cmm top-level datatypes</span></span><span>
</span><span id="line-9"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#CmmProgram"><span class="hs-identifier">CmmProgram</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmGroup"><span class="hs-identifier">CmmGroup</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmGroupSRTs"><span class="hs-identifier">CmmGroupSRTs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmGroup"><span class="hs-identifier">RawCmmGroup</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmGroup"><span class="hs-identifier">GenCmmGroup</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#CmmDecl"><span class="hs-identifier">CmmDecl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmDeclSRTs"><span class="hs-identifier">CmmDeclSRTs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier">GenCmmDecl</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier">CmmGraph</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmGraph"><span class="hs-identifier">GenCmmGraph</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#CmmBlock"><span class="hs-identifier">CmmBlock</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier">RawCmmDecl</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#Section"><span class="hs-identifier">Section</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#SectionType"><span class="hs-identifier">SectionType</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#GenCmmStatics"><span class="hs-identifier">GenCmmStatics</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-keyword">type</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmStatics"><span class="hs-identifier">CmmStatics</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-keyword">type</span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier">RawCmmStatics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmStatic"><span class="hs-identifier">CmmStatic</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#SectionProtection"><span class="hs-identifier">SectionProtection</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#sectionProtection"><span class="hs-identifier">sectionProtection</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span>     </span><span class="annot"><span class="hs-comment">-- ** Blocks containing lists</span></span><span>
</span><span id="line-18"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier">GenBasicBlock</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#blockId"><span class="hs-identifier">blockId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier">ListGraph</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#pprBBlock"><span class="hs-identifier">pprBBlock</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>     </span><span class="annot"><span class="hs-comment">-- * Info Tables</span></span><span>
</span><span id="line-22"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#CmmTopInfo"><span class="hs-identifier">CmmTopInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmStackInfo"><span class="hs-identifier">CmmStackInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier">CmmInfoTable</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.html#topInfoTable"><span class="hs-identifier">topInfoTable</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>     </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ClosureTypeInfo"><span class="hs-identifier">ClosureTypeInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#ProfilingInfo"><span class="hs-identifier">ProfilingInfo</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ConstrDescription"><span class="hs-identifier">ConstrDescription</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>     </span><span class="annot"><span class="hs-comment">-- * Statements, expressions and types</span></span><span>
</span><span id="line-27"></span><span>     </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html"><span class="hs-identifier">GHC.Cmm.Node</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>     </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html"><span class="hs-identifier">GHC.Cmm.Expr</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html"><span class="hs-identifier">GHC.Types.CostCentre</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html"><span class="hs-identifier">GHC.Cmm.BlockId</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html"><span class="hs-identifier">GHC.Cmm.Node</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html"><span class="hs-identifier">GHC.Runtime.Heap.Layout</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html"><span class="hs-identifier">GHC.Cmm.Expr</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Block</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Collections</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Graph</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Label</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-48"></span><span class="hs-comment">--  Cmm, GenCmm</span><span>
</span><span id="line-49"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-comment">-- A CmmProgram is a list of CmmGroups</span><span>
</span><span id="line-52"></span><span class="hs-comment">-- A CmmGroup is a list of top-level declarations</span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span class="hs-comment">-- When object-splitting is on, each group is compiled into a separate</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- .o file. So typically we put closely related stuff in a CmmGroup.</span><span>
</span><span id="line-56"></span><span class="hs-comment">-- Section-splitting follows suit and makes one .text subsection for each</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- CmmGroup.</span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-keyword">type</span><span> </span><span id="CmmProgram"><span class="annot"><a href="GHC.Cmm.html#CmmProgram"><span class="hs-identifier hs-var">CmmProgram</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.html#CmmGroup"><span class="hs-identifier hs-type">CmmGroup</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span class="hs-keyword">type</span><span> </span><span id="GenCmmGroup"><span class="annot"><a href="GHC.Cmm.html#GenCmmGroup"><span class="hs-identifier hs-var">GenCmmGroup</span></a></span></span><span> </span><span id="local-6989586621680933895"><span class="annot"><a href="#local-6989586621680933895"><span class="hs-identifier hs-type">d</span></a></span></span><span> </span><span id="local-6989586621680933894"><span class="annot"><a href="#local-6989586621680933894"><span class="hs-identifier hs-type">h</span></a></span></span><span> </span><span id="local-6989586621680933893"><span class="annot"><a href="#local-6989586621680933893"><span class="hs-identifier hs-type">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933895"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933894"><span class="hs-identifier hs-type">h</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933893"><span class="hs-identifier hs-type">g</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-62"></span><span class="hs-comment">-- | Cmm group before SRT generation</span><span>
</span><span id="line-63"></span><span class="hs-keyword">type</span><span> </span><span id="CmmGroup"><span class="annot"><a href="GHC.Cmm.html#CmmGroup"><span class="hs-identifier hs-var">CmmGroup</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmGroup"><span class="hs-identifier hs-type">GenCmmGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmStatics"><span class="hs-identifier hs-type">CmmStatics</span></a></span><span>    </span><span class="annot"><a href="GHC.Cmm.html#CmmTopInfo"><span class="hs-identifier hs-type">CmmTopInfo</span></a></span><span>               </span><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier hs-type">CmmGraph</span></a></span><span>
</span><span id="line-64"></span><span class="hs-comment">-- | Cmm group with SRTs</span><span>
</span><span id="line-65"></span><span class="hs-keyword">type</span><span> </span><span id="CmmGroupSRTs"><span class="annot"><a href="GHC.Cmm.html#CmmGroupSRTs"><span class="hs-identifier hs-var">CmmGroupSRTs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmGroup"><span class="hs-identifier hs-type">GenCmmGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmTopInfo"><span class="hs-identifier hs-type">CmmTopInfo</span></a></span><span>               </span><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier hs-type">CmmGraph</span></a></span><span>
</span><span id="line-66"></span><span class="hs-comment">-- | &quot;Raw&quot; cmm group (TODO (osa): not sure what that means)</span><span>
</span><span id="line-67"></span><span class="hs-keyword">type</span><span> </span><span id="RawCmmGroup"><span class="annot"><a href="GHC.Cmm.html#RawCmmGroup"><span class="hs-identifier hs-var">RawCmmGroup</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmGroup"><span class="hs-identifier hs-type">GenCmmGroup</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier hs-type">CmmGraph</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-70"></span><span class="hs-comment">--  CmmDecl, GenCmmDecl</span><span>
</span><span id="line-71"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- GenCmmDecl is abstracted over</span><span>
</span><span id="line-74"></span><span class="hs-comment">--   d, the type of static data elements in CmmData</span><span>
</span><span id="line-75"></span><span class="hs-comment">--   h, the static info preceding the code of a CmmProc</span><span>
</span><span id="line-76"></span><span class="hs-comment">--   g, the control-flow graph of a CmmProc</span><span>
</span><span id="line-77"></span><span class="hs-comment">--</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- We expect there to be two main instances of this type:</span><span>
</span><span id="line-79"></span><span class="hs-comment">--   (a) C--, i.e. populated with various C-- constructs</span><span>
</span><span id="line-80"></span><span class="hs-comment">--   (b) Native code, populated with data/instructions</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- | A top-level chunk, abstracted over the type of the contents of</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- the basic blocks (Cmm or instructions are the likely instantiations).</span><span>
</span><span id="line-84"></span><span class="hs-keyword">data</span><span> </span><span id="GenCmmDecl"><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-var">GenCmmDecl</span></a></span></span><span> </span><span id="local-6989586621680933892"><span class="annot"><a href="#local-6989586621680933892"><span class="hs-identifier hs-type">d</span></a></span></span><span> </span><span id="local-6989586621680933891"><span class="annot"><a href="#local-6989586621680933891"><span class="hs-identifier hs-type">h</span></a></span></span><span> </span><span id="local-6989586621680933890"><span class="annot"><a href="#local-6989586621680933890"><span class="hs-identifier hs-type">g</span></a></span></span><span>
</span><span id="line-85"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="CmmProc"><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span></span><span>     </span><span class="hs-comment">-- A procedure</span><span>
</span><span id="line-86"></span><span>     </span><span class="annot"><a href="#local-6989586621680933891"><span class="hs-identifier hs-type">h</span></a></span><span>                 </span><span class="hs-comment">-- Extra header such as the info table</span><span>
</span><span id="line-87"></span><span>     </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>            </span><span class="hs-comment">-- Entry label</span><span>
</span><span id="line-88"></span><span>     </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#GlobalReg"><span class="hs-identifier hs-type">GlobalReg</span></a></span><span class="hs-special">]</span><span>       </span><span class="hs-comment">-- Registers live on entry. Note that the set of live</span><span>
</span><span id="line-89"></span><span>                       </span><span class="hs-comment">-- registers will be correct in generated C-- code, but</span><span>
</span><span id="line-90"></span><span>                       </span><span class="hs-comment">-- not in hand-written C-- code. However,</span><span>
</span><span id="line-91"></span><span>                       </span><span class="hs-comment">-- splitAtProcPoints calculates correct liveness</span><span>
</span><span id="line-92"></span><span>                       </span><span class="hs-comment">-- information for CmmProcs.</span><span>
</span><span id="line-93"></span><span>     </span><span class="annot"><a href="#local-6989586621680933890"><span class="hs-identifier hs-type">g</span></a></span><span>                 </span><span class="hs-comment">-- Control-flow graph for the procedure's code</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CmmData"><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-var">CmmData</span></a></span></span><span>     </span><span class="hs-comment">-- Static data</span><span>
</span><span id="line-96"></span><span>        </span><span class="annot"><a href="GHC.Cmm.html#Section"><span class="hs-identifier hs-type">Section</span></a></span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><a href="#local-6989586621680933892"><span class="hs-identifier hs-type">d</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="hs-keyword">type</span><span> </span><span id="CmmDecl"><span class="annot"><a href="GHC.Cmm.html#CmmDecl"><span class="hs-identifier hs-var">CmmDecl</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmStatics"><span class="hs-identifier hs-type">CmmStatics</span></a></span><span>    </span><span class="annot"><a href="GHC.Cmm.html#CmmTopInfo"><span class="hs-identifier hs-type">CmmTopInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier hs-type">CmmGraph</span></a></span><span>
</span><span id="line-100"></span><span class="hs-keyword">type</span><span> </span><span id="CmmDeclSRTs"><span class="annot"><a href="GHC.Cmm.html#CmmDeclSRTs"><span class="hs-identifier hs-var">CmmDeclSRTs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmTopInfo"><span class="hs-identifier hs-type">CmmTopInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier hs-type">CmmGraph</span></a></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="hs-keyword">type</span><span> </span><span id="RawCmmDecl"><span class="annot"><a href="GHC.Cmm.html#RawCmmDecl"><span class="hs-identifier hs-var">RawCmmDecl</span></a></span></span><span>
</span><span id="line-103"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span>
</span><span id="line-104"></span><span>        </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span>
</span><span id="line-105"></span><span>        </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>        </span><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier hs-type">CmmGraph</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-109"></span><span class="hs-comment">--     Graphs</span><span>
</span><span id="line-110"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-keyword">type</span><span> </span><span id="CmmGraph"><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier hs-var">CmmGraph</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmGraph"><span class="hs-identifier hs-type">GenCmmGraph</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span>
</span><span id="line-113"></span><span class="hs-keyword">data</span><span> </span><span id="GenCmmGraph"><span class="annot"><a href="GHC.Cmm.html#GenCmmGraph"><span class="hs-identifier hs-var">GenCmmGraph</span></a></span></span><span> </span><span id="local-6989586621680933969"><span class="annot"><a href="#local-6989586621680933969"><span class="hs-identifier hs-type">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CmmGraph"><span class="annot"><a href="GHC.Cmm.html#CmmGraph"><span class="hs-identifier hs-var">CmmGraph</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="g_entry"><span class="annot"><span class="annottext">forall (n :: Extensibility -&gt; Extensibility -&gt; *).
GenCmmGraph n -&gt; BlockId
</span><a href="GHC.Cmm.html#g_entry"><span class="hs-identifier hs-var hs-var">g_entry</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">,</span><span> </span><span id="g_graph"><span class="annot"><span class="annottext">forall (n :: Extensibility -&gt; Extensibility -&gt; *).
GenCmmGraph n -&gt; Graph n C C
</span><a href="GHC.Cmm.html#g_graph"><span class="hs-identifier hs-var hs-var">g_graph</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Graph.html#Graph"><span class="hs-identifier hs-type">Graph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933969"><span class="hs-identifier hs-type">n</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-114"></span><span class="hs-keyword">type</span><span> </span><span id="CmmBlock"><span class="annot"><a href="GHC.Cmm.html#CmmBlock"><span class="hs-identifier hs-var">CmmBlock</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#Block"><span class="hs-identifier hs-type">Block</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Block.html#C"><span class="hs-identifier hs-type">C</span></a></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-117"></span><span class="hs-comment">--     Info Tables</span><span>
</span><span id="line-118"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span class="hs-comment">-- | CmmTopInfo is attached to each CmmDecl (see defn of CmmGroup), and contains</span><span>
</span><span id="line-121"></span><span class="hs-comment">-- the extra info (beyond the executable code) that belongs to that CmmDecl.</span><span>
</span><span id="line-122"></span><span class="hs-keyword">data</span><span> </span><span id="CmmTopInfo"><span class="annot"><a href="GHC.Cmm.html#CmmTopInfo"><span class="hs-identifier hs-var">CmmTopInfo</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="TopInfo"><span class="annot"><a href="GHC.Cmm.html#TopInfo"><span class="hs-identifier hs-var">TopInfo</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="info_tbls"><span class="annot"><span class="annottext">CmmTopInfo -&gt; LabelMap CmmInfoTable
</span><a href="GHC.Cmm.html#info_tbls"><span class="hs-identifier hs-var hs-var">info_tbls</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span>
</span><span id="line-123"></span><span>                            </span><span class="hs-special">,</span><span> </span><span id="stack_info"><span class="annot"><span class="annottext">CmmTopInfo -&gt; CmmStackInfo
</span><a href="GHC.Cmm.html#stack_info"><span class="hs-identifier hs-var hs-var">stack_info</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmStackInfo"><span class="hs-identifier hs-type">CmmStackInfo</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span id="local-6989586621680933957"><span id="local-6989586621680933958"><span class="annot"><a href="GHC.Cmm.html#topInfoTable"><span class="hs-identifier hs-type">topInfoTable</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933958"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmTopInfo"><span class="hs-identifier hs-type">CmmTopInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenCmmGraph"><span class="hs-identifier hs-type">GenCmmGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933957"><span class="hs-identifier hs-type">n</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span></span></span><span>
</span><span id="line-126"></span><span id="topInfoTable"><span class="annot"><span class="annottext">topInfoTable :: forall a (n :: Extensibility -&gt; Extensibility -&gt; *).
GenCmmDecl a CmmTopInfo (GenCmmGraph n) -&gt; Maybe CmmInfoTable
</span><a href="GHC.Cmm.html#topInfoTable"><span class="hs-identifier hs-var hs-var">topInfoTable</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621680933877"><span class="annot"><span class="annottext">CmmTopInfo
</span><a href="#local-6989586621680933877"><span class="hs-identifier hs-var">infos</span></a></span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680933876"><span class="annot"><span class="annottext">GenCmmGraph n
</span><a href="#local-6989586621680933876"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; LabelMap CmmInfoTable -&gt; Maybe CmmInfoTable
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenCmmGraph n -&gt; BlockId
forall (n :: Extensibility -&gt; Extensibility -&gt; *).
GenCmmGraph n -&gt; BlockId
</span><a href="GHC.Cmm.html#g_entry"><span class="hs-identifier hs-var hs-var">g_entry</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmGraph n
</span><a href="#local-6989586621680933876"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmTopInfo -&gt; LabelMap CmmInfoTable
</span><a href="GHC.Cmm.html#info_tbls"><span class="hs-identifier hs-var hs-var">info_tbls</span></a></span><span> </span><span class="annot"><span class="annottext">CmmTopInfo
</span><a href="#local-6989586621680933877"><span class="hs-identifier hs-var">infos</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.Cmm.html#topInfoTable"><span class="hs-identifier hs-var">topInfoTable</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmDecl a CmmTopInfo (GenCmmGraph n)
</span><span class="hs-identifier">_</span></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CmmInfoTable
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span class="hs-keyword">data</span><span> </span><span id="CmmStackInfo"><span class="annot"><a href="GHC.Cmm.html#CmmStackInfo"><span class="hs-identifier hs-var">CmmStackInfo</span></a></span></span><span>
</span><span id="line-130"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="StackInfo"><span class="annot"><a href="GHC.Cmm.html#StackInfo"><span class="hs-identifier hs-var">StackInfo</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-131"></span><span>       </span><span id="arg_space"><span class="annot"><span class="annottext">CmmStackInfo -&gt; ByteOff
</span><a href="GHC.Cmm.html#arg_space"><span class="hs-identifier hs-var hs-var">arg_space</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#ByteOff"><span class="hs-identifier hs-type">ByteOff</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-132"></span><span>               </span><span class="hs-comment">-- number of bytes of arguments on the stack on entry to the</span><span>
</span><span id="line-133"></span><span>               </span><span class="hs-comment">-- the proc.  This is filled in by GHC.StgToCmm.codeGen, and</span><span>
</span><span id="line-134"></span><span>               </span><span class="hs-comment">-- used by the stack allocator later.</span><span>
</span><span id="line-135"></span><span>       </span><span id="do_layout"><span class="annot"><span class="annottext">CmmStackInfo -&gt; Bool
</span><a href="GHC.Cmm.html#do_layout"><span class="hs-identifier hs-var hs-var">do_layout</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-136"></span><span>               </span><span class="hs-comment">-- Do automatic stack layout for this proc.  This is</span><span>
</span><span id="line-137"></span><span>               </span><span class="hs-comment">-- True for all code generated by the code generator,</span><span>
</span><span id="line-138"></span><span>               </span><span class="hs-comment">-- but is occasionally False for hand-written Cmm where</span><span>
</span><span id="line-139"></span><span>               </span><span class="hs-comment">-- we want to do the stack manipulation manually.</span><span>
</span><span id="line-140"></span><span>  </span><span class="hs-special">}</span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span class="hs-comment">-- | Info table as a haskell data type</span><span>
</span><span id="line-143"></span><span class="hs-keyword">data</span><span> </span><span id="CmmInfoTable"><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-var">CmmInfoTable</span></a></span></span><span>
</span><span id="line-144"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="CmmInfoTable"><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-var">CmmInfoTable</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-145"></span><span>      </span><span id="cit_lbl"><span class="annot"><span class="annottext">CmmInfoTable -&gt; CLabel
</span><a href="GHC.Cmm.html#cit_lbl"><span class="hs-identifier hs-var hs-var">cit_lbl</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- Info table label</span><span>
</span><span id="line-146"></span><span>      </span><span id="cit_rep"><span class="annot"><span class="annottext">CmmInfoTable -&gt; SMRep
</span><a href="GHC.Cmm.html#cit_rep"><span class="hs-identifier hs-var hs-var">cit_rep</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-147"></span><span>      </span><span id="cit_prof"><span class="annot"><span class="annottext">CmmInfoTable -&gt; ProfilingInfo
</span><a href="GHC.Cmm.html#cit_prof"><span class="hs-identifier hs-var hs-var">cit_prof</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#ProfilingInfo"><span class="hs-identifier hs-type">ProfilingInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-148"></span><span>      </span><span id="cit_srt"><span class="annot"><span class="annottext">CmmInfoTable -&gt; Maybe CLabel
</span><a href="GHC.Cmm.html#cit_srt"><span class="hs-identifier hs-var hs-var">cit_srt</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- empty, or a closure address</span><span>
</span><span id="line-149"></span><span>      </span><span id="cit_clo"><span class="annot"><span class="annottext">CmmInfoTable -&gt; Maybe (Id, CostCentreStack)
</span><a href="GHC.Cmm.html#cit_clo"><span class="hs-identifier hs-var hs-var">cit_clo</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html#CostCentreStack"><span class="hs-identifier hs-type">CostCentreStack</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-150"></span><span>        </span><span class="hs-comment">-- Just (id,ccs) &lt;=&gt; build a static closure later</span><span>
</span><span id="line-151"></span><span>        </span><span class="hs-comment">-- Nothing &lt;=&gt; don't build a static closure</span><span>
</span><span id="line-152"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-153"></span><span>        </span><span class="hs-comment">-- Static closures for FUNs and THUNKs are *not* generated by</span><span>
</span><span id="line-154"></span><span>        </span><span class="hs-comment">-- the code generator, because we might want to add SRT</span><span>
</span><span id="line-155"></span><span>        </span><span class="hs-comment">-- entries to them later (for FUNs at least; THUNKs are</span><span>
</span><span id="line-156"></span><span>        </span><span class="hs-comment">-- treated the same for consistency). See Note [SRTs] in</span><span>
</span><span id="line-157"></span><span>        </span><span class="hs-comment">-- GHC.Cmm.Info.Build, in particular the [FUN] optimisation.</span><span>
</span><span id="line-158"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-159"></span><span>        </span><span class="hs-comment">-- This is strictly speaking not a part of the info table that</span><span>
</span><span id="line-160"></span><span>        </span><span class="hs-comment">-- will be finally generated, but it's the only convenient</span><span>
</span><span id="line-161"></span><span>        </span><span class="hs-comment">-- place to convey this information from the code generator to</span><span>
</span><span id="line-162"></span><span>        </span><span class="hs-comment">-- where we build the static closures in</span><span>
</span><span id="line-163"></span><span>        </span><span class="hs-comment">-- GHC.Cmm.Info.Build.doSRTs.</span><span>
</span><span id="line-164"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="hs-keyword">data</span><span> </span><span id="ProfilingInfo"><span class="annot"><a href="GHC.Cmm.html#ProfilingInfo"><span class="hs-identifier hs-var">ProfilingInfo</span></a></span></span><span>
</span><span id="line-167"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="NoProfilingInfo"><span class="annot"><a href="GHC.Cmm.html#NoProfilingInfo"><span class="hs-identifier hs-var">NoProfilingInfo</span></a></span></span><span>
</span><span id="line-168"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ProfilingInfo"><span class="annot"><a href="GHC.Cmm.html#ProfilingInfo"><span class="hs-identifier hs-var">ProfilingInfo</span></a></span></span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-comment">-- closure_type, closure_desc</span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-171"></span><span class="hs-comment">--              Static Data</span><span>
</span><span id="line-172"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span class="hs-keyword">data</span><span> </span><span id="SectionType"><span class="annot"><a href="GHC.Cmm.html#SectionType"><span class="hs-identifier hs-var">SectionType</span></a></span></span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Text"><span class="annot"><a href="GHC.Cmm.html#Text"><span class="hs-identifier hs-var">Text</span></a></span></span><span>
</span><span id="line-176"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Data"><span class="annot"><a href="GHC.Cmm.html#Data"><span class="hs-identifier hs-var">Data</span></a></span></span><span>
</span><span id="line-177"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ReadOnlyData"><span class="annot"><a href="GHC.Cmm.html#ReadOnlyData"><span class="hs-identifier hs-var">ReadOnlyData</span></a></span></span><span>
</span><span id="line-178"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="RelocatableReadOnlyData"><span class="annot"><a href="GHC.Cmm.html#RelocatableReadOnlyData"><span class="hs-identifier hs-var">RelocatableReadOnlyData</span></a></span></span><span>
</span><span id="line-179"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="UninitialisedData"><span class="annot"><a href="GHC.Cmm.html#UninitialisedData"><span class="hs-identifier hs-var">UninitialisedData</span></a></span></span><span>
</span><span id="line-180"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ReadOnlyData16"><span class="annot"><a href="GHC.Cmm.html#ReadOnlyData16"><span class="hs-identifier hs-var">ReadOnlyData16</span></a></span></span><span>      </span><span class="hs-comment">-- .rodata.cst16 on x86_64, 16-byte aligned</span><span>
</span><span id="line-181"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CString"><span class="annot"><a href="GHC.Cmm.html#CString"><span class="hs-identifier hs-var">CString</span></a></span></span><span>
</span><span id="line-182"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="OtherSection"><span class="annot"><a href="GHC.Cmm.html#OtherSection"><span class="hs-identifier hs-var">OtherSection</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-183"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680933845"><span id="local-6989586621680933847"><span id="local-6989586621680933854"><span class="annot"><span class="annottext">ByteOff -&gt; SectionType -&gt; ShowS
[SectionType] -&gt; ShowS
SectionType -&gt; String
(ByteOff -&gt; SectionType -&gt; ShowS)
-&gt; (SectionType -&gt; String)
-&gt; ([SectionType] -&gt; ShowS)
-&gt; Show SectionType
forall a.
(ByteOff -&gt; a -&gt; ShowS)
-&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [SectionType] -&gt; ShowS
$cshowList :: [SectionType] -&gt; ShowS
show :: SectionType -&gt; String
$cshow :: SectionType -&gt; String
showsPrec :: ByteOff -&gt; SectionType -&gt; ShowS
$cshowsPrec :: ByteOff -&gt; SectionType -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span class="hs-keyword">data</span><span> </span><span id="SectionProtection"><span class="annot"><a href="GHC.Cmm.html#SectionProtection"><span class="hs-identifier hs-var">SectionProtection</span></a></span></span><span>
</span><span id="line-186"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="ReadWriteSection"><span class="annot"><a href="GHC.Cmm.html#ReadWriteSection"><span class="hs-identifier hs-var">ReadWriteSection</span></a></span></span><span>
</span><span id="line-187"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="ReadOnlySection"><span class="annot"><a href="GHC.Cmm.html#ReadOnlySection"><span class="hs-identifier hs-var">ReadOnlySection</span></a></span></span><span>
</span><span id="line-188"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="WriteProtectedSection"><span class="annot"><a href="GHC.Cmm.html#WriteProtectedSection"><span class="hs-identifier hs-var">WriteProtectedSection</span></a></span></span><span> </span><span class="hs-comment">-- See Note [Relocatable Read-Only Data]</span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680933836"><span id="local-6989586621680933838"><span class="annot"><span class="annottext">SectionProtection -&gt; SectionProtection -&gt; Bool
(SectionProtection -&gt; SectionProtection -&gt; Bool)
-&gt; (SectionProtection -&gt; SectionProtection -&gt; Bool)
-&gt; Eq SectionProtection
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: SectionProtection -&gt; SectionProtection -&gt; Bool
$c/= :: SectionProtection -&gt; SectionProtection -&gt; Bool
== :: SectionProtection -&gt; SectionProtection -&gt; Bool
$c== :: SectionProtection -&gt; SectionProtection -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span class="hs-comment">-- | Should a data in this section be considered constant at runtime</span><span>
</span><span id="line-192"></span><span class="annot"><a href="GHC.Cmm.html#sectionProtection"><span class="hs-identifier hs-type">sectionProtection</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#Section"><span class="hs-identifier hs-type">Section</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#SectionProtection"><span class="hs-identifier hs-type">SectionProtection</span></a></span><span>
</span><span id="line-193"></span><span id="sectionProtection"><span class="annot"><span class="annottext">sectionProtection :: Section -&gt; SectionProtection
</span><a href="GHC.Cmm.html#sectionProtection"><span class="hs-identifier hs-var hs-var">sectionProtection</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#Section"><span class="hs-identifier hs-type">Section</span></a></span><span> </span><span id="local-6989586621680933833"><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621680933833"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621680933833"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-194"></span><span>    </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#Text"><span class="hs-identifier hs-var">Text</span></a></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionProtection
</span><a href="GHC.Cmm.html#ReadOnlySection"><span class="hs-identifier hs-var">ReadOnlySection</span></a></span><span>
</span><span id="line-195"></span><span>    </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#ReadOnlyData"><span class="hs-identifier hs-var">ReadOnlyData</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionProtection
</span><a href="GHC.Cmm.html#ReadOnlySection"><span class="hs-identifier hs-var">ReadOnlySection</span></a></span><span>
</span><span id="line-196"></span><span>    </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#RelocatableReadOnlyData"><span class="hs-identifier hs-var">RelocatableReadOnlyData</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionProtection
</span><a href="GHC.Cmm.html#WriteProtectedSection"><span class="hs-identifier hs-var">WriteProtectedSection</span></a></span><span>
</span><span id="line-197"></span><span>    </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#ReadOnlyData16"><span class="hs-identifier hs-var">ReadOnlyData16</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionProtection
</span><a href="GHC.Cmm.html#ReadOnlySection"><span class="hs-identifier hs-var">ReadOnlySection</span></a></span><span>
</span><span id="line-198"></span><span>    </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#CString"><span class="hs-identifier hs-var">CString</span></a></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionProtection
</span><a href="GHC.Cmm.html#ReadOnlySection"><span class="hs-identifier hs-var">ReadOnlySection</span></a></span><span>
</span><span id="line-199"></span><span>    </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#Data"><span class="hs-identifier hs-var">Data</span></a></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionProtection
</span><a href="GHC.Cmm.html#ReadWriteSection"><span class="hs-identifier hs-var">ReadWriteSection</span></a></span><span>
</span><span id="line-200"></span><span>    </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#UninitialisedData"><span class="hs-identifier hs-var">UninitialisedData</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionProtection
</span><a href="GHC.Cmm.html#ReadWriteSection"><span class="hs-identifier hs-var">ReadWriteSection</span></a></span><span>
</span><span id="line-201"></span><span>    </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#OtherSection"><span class="hs-identifier hs-type">OtherSection</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionProtection
</span><a href="GHC.Cmm.html#ReadWriteSection"><span class="hs-identifier hs-var">ReadWriteSection</span></a></span><span>
</span><span id="line-202"></span><span>
</span><span id="line-203"></span><span class="hs-comment">{-
Note [Relocatable Read-Only Data]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Relocatable data are only read-only after relocation at the start of the
program. They should be writable from the source code until then. Failure to
do so would end up in segfaults at execution when using linkers that do not
enforce writability of those sections, such as the gold linker.
-}</span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span class="hs-keyword">data</span><span> </span><span id="Section"><span class="annot"><a href="GHC.Cmm.html#Section"><span class="hs-identifier hs-var">Section</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Section"><span class="annot"><a href="GHC.Cmm.html#Section"><span class="hs-identifier hs-var">Section</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#SectionType"><span class="hs-identifier hs-type">SectionType</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-214"></span><span>
</span><span id="line-215"></span><span class="hs-keyword">data</span><span> </span><span id="CmmStatic"><span class="annot"><a href="GHC.Cmm.html#CmmStatic"><span class="hs-identifier hs-var">CmmStatic</span></a></span></span><span>
</span><span id="line-216"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="CmmStaticLit"><span class="annot"><a href="GHC.Cmm.html#CmmStaticLit"><span class="hs-identifier hs-var">CmmStaticLit</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span>
</span><span id="line-217"></span><span>        </span><span class="hs-comment">-- ^ a literal value, size given by cmmLitRep of the literal.</span><span>
</span><span id="line-218"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CmmUninitialised"><span class="annot"><a href="GHC.Cmm.html#CmmUninitialised"><span class="hs-identifier hs-var">CmmUninitialised</span></a></span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-219"></span><span>        </span><span class="hs-comment">-- ^ uninitialised data, N bytes long</span><span>
</span><span id="line-220"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CmmString"><span class="annot"><a href="GHC.Cmm.html#CmmString"><span class="hs-identifier hs-var">CmmString</span></a></span></span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span>
</span><span id="line-221"></span><span>        </span><span class="hs-comment">-- ^ string of 8-bit values only, not zero terminated.</span><span>
</span><span id="line-222"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="CmmFileEmbed"><span class="annot"><a href="GHC.Cmm.html#CmmFileEmbed"><span class="hs-identifier hs-var">CmmFileEmbed</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-223"></span><span>        </span><span class="hs-comment">-- ^ an embedded binary file</span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span class="hs-comment">-- Static data before SRT generation</span><span>
</span><span id="line-226"></span><span class="hs-keyword">data</span><span> </span><span id="GenCmmStatics"><span class="annot"><a href="GHC.Cmm.html#GenCmmStatics"><span class="hs-identifier hs-var">GenCmmStatics</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680933826"><span class="annot"><a href="#local-6989586621680933826"><span class="hs-identifier hs-type">rawOnly</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-227"></span><span>    </span><span id="CmmStatics"><span class="annot"><a href="GHC.Cmm.html#CmmStatics"><span class="hs-identifier hs-var">CmmStatics</span></a></span></span><span>
</span><span id="line-228"></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>       </span><span class="hs-comment">-- Label of statics</span><span>
</span><span id="line-229"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmInfoTable"><span class="hs-identifier hs-type">CmmInfoTable</span></a></span><span>
</span><span id="line-230"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.html#CostCentreStack"><span class="hs-identifier hs-type">CostCentreStack</span></a></span><span>
</span><span id="line-231"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span class="hs-special">]</span><span>     </span><span class="hs-comment">-- Payload</span><span>
</span><span id="line-232"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmStatics"><span class="hs-identifier hs-type">GenCmmStatics</span></a></span><span> </span><span class="hs-special">'</span><span class="annot"><span class="hs-identifier hs-type">False</span></span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span>    </span><span class="hs-comment">-- | Static data, after SRTs are generated</span><span>
</span><span id="line-235"></span><span>    </span><span id="local-6989586621680933824"><span id="CmmStaticsRaw"><span class="annot"><a href="GHC.Cmm.html#CmmStaticsRaw"><span class="hs-identifier hs-var">CmmStaticsRaw</span></a></span></span><span>
</span><span id="line-236"></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>       </span><span class="hs-comment">-- Label of statics</span><span>
</span><span id="line-237"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.html#CmmStatic"><span class="hs-identifier hs-type">CmmStatic</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- The static data itself</span><span>
</span><span id="line-238"></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmStatics"><span class="hs-identifier hs-type">GenCmmStatics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933824"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span class="hs-keyword">type</span><span> </span><span id="CmmStatics"><span class="annot"><a href="GHC.Cmm.html#CmmStatics"><span class="hs-identifier hs-var">CmmStatics</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmStatics"><span class="hs-identifier hs-type">GenCmmStatics</span></a></span><span> </span><span class="hs-special">'</span><span class="annot"><span class="hs-identifier hs-type">False</span></span><span>
</span><span id="line-241"></span><span class="hs-keyword">type</span><span> </span><span id="RawCmmStatics"><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-var">RawCmmStatics</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmStatics"><span class="hs-identifier hs-type">GenCmmStatics</span></a></span><span> </span><span class="hs-special">'</span><span class="annot"><span class="hs-identifier hs-type">True</span></span><span>
</span><span id="line-242"></span><span>
</span><span id="line-243"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-244"></span><span class="hs-comment">-- Basic blocks consisting of lists</span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- These are used by the LLVM and NCG backends, when populating Cmm</span><span>
</span><span id="line-247"></span><span class="hs-comment">-- with lists of instructions.</span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span class="hs-keyword">data</span><span> </span><span id="GenBasicBlock"><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-var">GenBasicBlock</span></a></span></span><span> </span><span id="local-6989586621680933822"><span class="annot"><a href="#local-6989586621680933822"><span class="hs-identifier hs-type">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="BasicBlock"><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-var">BasicBlock</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621680933822"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span class="hs-comment">-- | The branch block id is that of the first block in</span><span>
</span><span id="line-252"></span><span class="hs-comment">-- the branch, which is that branch's entry point</span><span>
</span><span id="line-253"></span><span id="local-6989586621680933936"><span class="annot"><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-type">blockId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933936"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span></span><span>
</span><span id="line-254"></span><span id="blockId"><span class="annot"><span class="annottext">blockId :: forall i. GenBasicBlock i -&gt; BlockId
</span><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-var hs-var">blockId</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621680933820"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621680933820"><span class="hs-identifier hs-var">blk_id</span></a></span></span><span> </span><span class="annot"><span class="annottext">[i]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621680933820"><span class="hs-identifier hs-var">blk_id</span></a></span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-keyword">newtype</span><span> </span><span id="ListGraph"><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-var">ListGraph</span></a></span></span><span> </span><span id="local-6989586621680933819"><span class="annot"><a href="#local-6989586621680933819"><span class="hs-identifier hs-type">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ListGraph"><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-var">ListGraph</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933819"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span id="local-6989586621680933932"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680933815"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933932"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933932"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-259"></span><span>    </span><span id="local-6989586621680933812"><span class="annot"><span class="annottext">ppr :: ListGraph instr -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621680933810"><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621680933810"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(GenBasicBlock instr -&gt; SDoc) -&gt; [GenBasicBlock instr] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621680933810"><span class="hs-identifier hs-var">blocks</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span id="local-6989586621680933931"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680933806"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933931"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933931"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-262"></span><span>    </span><span id="local-6989586621680933804"><span class="annot"><span class="annottext">ppr :: GenBasicBlock instr -&gt; SDoc
</span><a href="#local-6989586621680933804"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr -&gt; SDoc
forall instr. Outputable instr =&gt; GenBasicBlock instr -&gt; SDoc
</span><a href="GHC.Cmm.html#pprBBlock"><span class="hs-identifier hs-var">pprBBlock</span></a></span></span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span id="local-6989586621680933803"><span class="annot"><a href="GHC.Cmm.html#pprBBlock"><span class="hs-identifier hs-type">pprBBlock</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933803"><span class="hs-identifier hs-type">stmt</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680933803"><span class="hs-identifier hs-type">stmt</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span></span><span>
</span><span id="line-265"></span><span id="pprBBlock"><span class="annot"><span class="annottext">pprBBlock :: forall instr. Outputable instr =&gt; GenBasicBlock instr -&gt; SDoc
</span><a href="GHC.Cmm.html#pprBBlock"><span class="hs-identifier hs-var hs-var">pprBBlock</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621680933798"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621680933798"><span class="hs-identifier hs-var">ident</span></a></span></span><span> </span><span id="local-6989586621680933797"><span class="annot"><span class="annottext">[stmt]
</span><a href="#local-6989586621680933797"><span class="hs-identifier hs-var">stmts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-266"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; ByteOff -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621680933798"><span class="hs-identifier hs-var">ident</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#colon"><span class="hs-identifier hs-var">colon</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteOff
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(stmt -&gt; SDoc) -&gt; [stmt] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">stmt -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[stmt]
</span><a href="#local-6989586621680933797"><span class="hs-identifier hs-var">stmts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span>
</span><span id="line-268"></span></pre></body></html>